#define _CRT_SECURE_NO_WARNINGS 1

#include "Sort.h"

#include <stdio.h>

void Print(int* a, int n)
{
	assert(a);

	for (int i = 0; i < n; ++i)
	{
		printf("%d ", a[i]);
	}
	printf("\n");
}

void test1()
{
	int a[] = { 3,44,38,5,47,15,36,26,27,2,46,4,19,50,48 };
	int n = sizeof(a) / sizeof(a[0]);

	InsertSort(a, n);

	Print(a, n);
}

void test2()
{
	int a[] = { 3,44,38,5,47,15,36,26,27,2,46,4,19,50,48 };
	int n = sizeof(a) / sizeof(a[0]);

	ShellSort(a, n);

	Print(a, n);
}

void test3()
{
	int a[] = { 3,44,38,5,47,15,36,26,27,2,46,4,19,50,48 };
	int n = sizeof(a) / sizeof(a[0]);

	SelectSort(a, n);

	Print(a, n);
}

void test4()
{
	int a[] = { 3,44,38,5,47,15,36,26,27,2,46,4,19,50,48 };
	int n = sizeof(a) / sizeof(a[0]);

	HeapSort(a, n);

	Print(a, n);
}

void test5()
{
	int a[] = { 3,44,38,5,47,15,36,26,27,2,46,4,19,50,48 };
	int n = sizeof(a) / sizeof(a[0]);

	BubbleSort(a, n);

	Print(a, n);
}

void test6()
{
	int a[] = { 5,1,1,2,0,0 };
	int n = sizeof(a) / sizeof(a[0]);

	QuickSort(a, 0, n - 1);

	Print(a, n);
}

int main()
{
	test6();


	return 0;
}